<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/templates/BasicTemplate.xhtml">

	<ui:define name="content">
		<div align="center">
			<h:dataTable value="#{userBean.myBooks}" var="item" bgcolor="#F1F1F1"
				border="2" width="90%" >
				<h:column>
					<f:facet name="header">Tytuł</f:facet>
					<h:outputText value="#{item.book.title}" />
				</h:column>

				<h:column>
					<f:facet name="header">Autor</f:facet>
					<h:outputText value="#{item.book.author}" />
				</h:column>

				<h:column>
					<f:facet name="header">Wydawnictwo</f:facet>
					<h:outputText value="#{item.book.publisher}" />
				</h:column>

				<h:column>
					<f:facet name="header">Rok wydania</f:facet>
					<h:outputText value="#{item.book.publicationYear}" />
				</h:column>

				<h:column>
					<f:facet name="header">Kategorie</f:facet>
					<h:outputText value="#{item.book.categories}" />
				</h:column>
				
				<h:column>
					<f:facet name="header">Status</f:facet>
					<h:outputLabel value="#{(item.lent == true)? 'Wypożyczona' : 'Dostępna'}"/>
				</h:column>
			</h:dataTable>
		</div>
	</ui:define>

</ui:composition>
</html>